{extend name="public/base"/}
{block name="style"}
{/block}
{block name="body"}
{include file="public/header" /}
<div class="bodySection">
    <div class="centerSection">
        <div class="leftSection">
            <div class="section_title2">共找到{$total}部相关作品</div>
            <div class="caseSection">
                <div class="caseSection_list">
                    <ul>
						{volist name="list" id="vo"}
                        <li>
							<a href="{:url('/book/info',array("id"=>$vo.id))}">
								<div class="leftImage">
									<img src="{$vo.cover}" alt="" onerror="javascript:this.src='/public/novel/images/default.jpg';"/>
								</div>
							</a>
							<div class="rightContent">
								<a href="{:url('/book/info',array("id"=>$vo.id))}"><div class="title">{$vo.title}</div></a>
								<div class="link">
									<span>{$vo.author}</span> |
									<span>{$vo.category_id|get_category=###,'title'}</span>
								</div>
								<a href="{:url('/book/info',array("id"=>$vo.id))}">
									<div class="cons">{$vo.intro|mb_substr=0,50,'utf-8'}……
									</div>
								</a>
								<div class="bottom">
									<span class="left"><a href="/chapter/read/{$vo.id}/{$vo.lastvolumeid}"><i>最新更新:  </i></a> {$vo.update_time|date='Y-m-d H:i:s',###}</span>
									<span class="right">
										<a class="button active" href="{:url('/book/info',array("id"=>$vo.id))}">开始阅读</a>
										<a class="button" onclick="addbookshelf({$vo.id}, 0, 2, '.lboyue.com')">加入书架</a>
									</span>
								</div>
							</div>
						</li>
						{/volist}	
					</ul>
                </div>
                {$list->render()}
            </div>
        </div>
        <div class="rightSection">
            <div class="recommendationSection">
                <div class="section_title">精品推荐</div>
                <div class="detailSection_other  detailSection_other2">
                    <div class="list">
                        <ul id="tj">
						</ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{block name="include"}{include file="public:footer" /}{/block}
{/block}
{block name="script"}
<script type="text/html" id="list2">
    <% for(var i = 0; i < data.length; i++){ %>
		<li>
			<a href="/book/info/id/<%= data[i]['id'] %>">
			<span class="left">
				<img src="<%= data[i]['cover'] %>" alt="" />
			</span>
			<span class="content">
				<span class="name"><%= data[i]['title'] %></span>
				<i>作者: <%= data[i]['author'] %></i>
				<span class="cons"><%= data[i]['intro'] %>...</span>
			</span>
			</a>
		</li>
	<% } %>    
</script>

<script type="text/javascript">
<!--
$(function () {

	$.ajax({
		url: '/api/api/getbook/',
		type: 'post',
		data:{
			type:9,
			start:0,
			limit:4,
			channel:0,
		},
		success: function (data) {
			if (data.code === 1) {
				var banner=template('list2',data);
				document.getElementById("tj").innerHTML = banner;
			}
		}
	});
});

//-->
</script>
<script type="text/javascript">
	 $(document).ready(function () {
		 bindrankstyle();
		 swiperInit();
		 liactive("navpages", "index","a","");
	 });
</script>
<script>
    $(document).ready(function () {
        bindnews();
        bindbookshelf();
        bindnav();
    });
</script>
{/block}


